home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / fgl110c.zip / 09-09.C < prev    next >
Text File  |  1992-01-31  |  846b  |  44 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. char arrow[] = {
  8.    0x00,0x00,0x00,0xF0,0x00,
  9.    0x00,0x00,0x00,0xFF,0x00,
  10.    0xFF,0xFF,0xFF,0xFF,0xF0,
  11.    0xFF,0xFF,0xFF,0xFF,0xFF,
  12.    0xFF,0xFF,0xFF,0xFF,0xF0,
  13.    0x00,0x00,0x00,0xFF,0x00,
  14.    0x00,0x00,0x00,0xF0,0x00
  15.    };
  16.  
  17. void main()
  18. {
  19.    int old_mode;
  20.  
  21.    if (fg_testmode(13,1) == 0) {
  22.       printf("This program requires a 320 ");
  23.       printf("x 200 EGA graphics mode.\n");
  24.       exit(1);
  25.       }
  26.  
  27.    old_mode = fg_getmode();
  28.    fg_setmode(13);
  29.    fg_setclip(0,15,0,199);
  30.  
  31.    fg_move(10,10);
  32.    fg_drwimage(arrow,5,7);
  33.    fg_move(10,20);
  34.    fg_clpimage(arrow,5,7);
  35.    fg_move(8,30);
  36.    fg_revimage(arrow,5,7);
  37.    fg_move(8,40);
  38.    fg_flpimage(arrow,5,7);
  39.    fg_waitkey();
  40.  
  41.    fg_setmode(old_mode);
  42.    fg_reset();
  43. }
  44.